﻿using System;
using System.Net.DnsToolkit.Packet;

namespace System.Net.DnsToolkit.Serializer {

    /// <summary>
    /// Write DNS Message to objects
    /// </summary>
    /// <typeparam name="T"></typeparam>
    public interface IMessageWriter<T> {

        /// <summary>
        /// Writes a message into destination T type using compression
        /// </summary>
        /// <param name="message"></param>
        /// <param name="destination"></param>
        void Write(T destination, IMessage message);

        /// <summary>
        /// Writes a message into destination T type
        /// </summary>
        /// <param name="message"></param>
        /// <param name="destination"></param>
        /// <param name="useCompression"></param>
        void Write(T destination, IMessage message, bool useCompression);

    }
}
